home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / audio / ALseterrorhandler.z / ALseterrorhandler
Encoding:
Text File  |  2002-10-03  |  4.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. AAAALLLLsssseeeetttteeeerrrrrrrroooorrrrhhhhaaaannnnddddlllleeeerrrr((((3333ddddmmmm))))                                  AAAALLLLsssseeeetttteeeerrrrrrrroooorrrrhhhhaaaannnnddddlllleeeerrrr((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ALseterrorhandler - (obsolete) establish an alternate audio error
  10.      handling routine
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiioooo....hhhh>>>>
  14.  
  15.      AAAALLLLeeeerrrrrrrrffffuuuunnnncccc AAAALLLLsssseeeetttteeeerrrrrrrroooorrrrhhhhaaaannnnddddlllleeeerrrr((((AAAALLLLeeeerrrrrrrrffffuuuunnnncccc eeeeffffuuuunnnncccc))))
  16.  
  17. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  18.      _e_f_u_n_c       expects a pointer to an error handling routine declared as
  19.                  vvvvooooiiiidddd eeeerrrrrrrroooorrrrffffuuuunnnncccc((((lllloooonnnngggg,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr****,,,, ............))))
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      AAAALLLLsssseeeetttteeeerrrrrrrroooorrrrhhhhaaaannnnddddlllleeeerrrr is obsolete and is provided for backward compatibility.
  23.      The preferred function is aaaallllSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((3333ddddmmmm)))).  Note that the default
  24.      error handler is now none; you must call aaaallllSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr to establish
  25.      one.
  26.  
  27.      The Audio Library provides a default error handling routine which prints
  28.      diagnostic messages whenever an error occurs in a library call.
  29.  
  30.      AAAALLLLsssseeeetttteeeerrrrrrrroooorrrrhhhhaaaannnnddddlllleeeerrrr((((3333ddddmmmm)))) allows you to override the default error handling
  31.      routine.
  32.  
  33.      The arguments that are passed to the error handling routine are an error
  34.      code and a printf-like string perhaps followed with printf-like
  35.      arguments.
  36.  
  37.      The returned value is a pointer to the previous error handling routine.
  38.  
  39.      Setting _e_f_u_n_c to 0 prevents any error handling routine from being called;
  40.      in this case, the application should check for errors by examining the AL
  41.      function return values.  Unless printed warnings are desired, we
  42.      recommend disabling the error handling function and testing for errors
  43.      within the application.
  44.  
  45. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  46.                #include <dmedia/audio.h>
  47.                ALerrfunc originalErrorHandler;
  48.                ...
  49.  
  50.                originalErrorHandler = ALseterrorhandler(0);
  51.                /* AL errors here will go unnoticed */
  52.                ...
  53.  
  54.                ALseterrorhandler(originalErrorHandler);
  55.                /* back to normal reporting of AL errors */
  56.  
  57.                ...
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. AAAALLLLsssseeeetttteeeerrrrrrrroooorrrrhhhhaaaannnnddddlllleeeerrrr((((3333ddddmmmm))))                                  AAAALLLLsssseeeetttteeeerrrrrrrroooorrrrhhhhaaaannnnddddlllleeeerrrr((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  75.      stdarg(5)
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.